package com.haisen.controller;


import com.haisen.core.utils.PageResultSet;
import com.haisen.dataobject.entity.StationBase;
import com.haisen.dataobject.entity.VerifyCodeHist;
import com.haisen.dataobject.query.StationBaseQuery;
import com.haisen.dataobject.query.VerifyCodeHistQuery;
import com.haisen.service.JobNoService;
import com.haisen.service.StationBaseService;
import com.haisen.service.VerifyCodeHistService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/station")
@Slf4j
public class StationBaseController {


    @Autowired
    private StationBaseService stationBaseService;

    @GetMapping
    public String page(Model model){
        return "customer/station";
    }

    /**
     * 所有等登录员工都可以看，所以不舍权限
     * @param stationBaseQuery
     * @return
     */
    @RequestMapping("/list")
    @ResponseBody
    public PageResultSet<StationBase> findByPage(StationBaseQuery stationBaseQuery){
        return stationBaseService.findByPage(stationBaseQuery);
    }


}
